<template>
  <div class="mobile minorsProtect-mobile">
    <div class="mobileHeight">
      <a-card :bordered="false" class="minorsProtect-carousel">
        <a-carousel autoplay>
          <div class="carousel-list"><img class="good-pic" src="../../assets/img/mobile/banner2.png"></div>
          <div class="carousel-list"><img class="good-pic" src="../../assets/img/mobile/banner3.png"></div>
          <div class="carousel-list"><img class="good-pic" src="../../assets/img/mobile/banner4.png"></div>
        </a-carousel>
      </a-card>
      <div class="minorsProtect">
        <a-divider class="minorsProtect-divider">如果在学习和生活中受到欺负，请勇于告诉我们</a-divider>
        <div class="minorsProtect-msg">
          <ul>
            <li @click="minorsProtectAdd(data[i].itemText,data[i].itemValue)" v-for="(v,i) in data">
              <span>{{data[i].itemText}}<i class="iconfont iconyou1 fr"></i></span>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <div class="weui-tabbar">
      <a href="javascript:void(0);" class="weui-tabbar__item" @click="firstPage()">
        <span><i class="iconfont iconziyuan"></i></span>
        <p class="weui-tabbar__label">首页</p>
      </a>
      <a href="javascript:void(0);" class="weui-tabbar__item" @click="hrhsPage()">
        <span><i class="iconfont icondianzan1"></i></span>
        <p class="weui-tabbar__label">好人好事</p>
      </a>
      <a href="javascript:void(0);" class="weui-tabbar__item" @click="myPage()">
        <span><i class="iconfont iconwode-copy"></i></span>
        <p class="weui-tabbar__label">我的</p>
      </a>
    </div>
  </div>
</template>
<script>
import { postAction,httpAction } from '@/api/manage'

export default {
  name: 'MinorsProtecteGuide',
  data() {
    return {
      data:[],
    };
  },
  created(){
    document.title = "未成年人保护";
    this.getMinorProjectType();
  },
  methods: {
    getMinorProjectType(){
      postAction("/minorProtect/getMinorProtectType").then(res=>{
        if(res.success){
          this.data = res.result.sysDictItemList;
          /*this.data = JSON.parse(res.result);*/
          /*this.realname = res.result.realname;
          this.username = res.result.username;
          this.departIds = res.result.departIds;
          this.classes = res.result.classes;*/
        }
      }).catch(()=>{

      })
    },
    minorsProtectAdd(itemText,itemValue){
      this.$router.push({path:'/MinorsProtecteAdd',query:{itemText:itemText,itemValue:itemValue}});
    },
    firstPage(){
      this.$router.push('/MinorsProtecteGuide');
    },
    hrhsPage(){
      this.$router.push('/GoodThingsList');
    },
    myPage(){
      this.$router.push('/PersonalMsg');
    }
  }
};
</script>
